package com.guigu.qingcheng.service;

import com.guigu.qingcheng.pojo.user.TbAddress;
import com.guigu.qingcheng.pojo.user.TbUser;
import com.guigu.qingcheng.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient("service-user")
public interface UserFeign {

    @GetMapping("/service_user/tb-address/findAddressList")
    public List<TbAddress> findAddressList(@RequestParam("username") String username);

    @PostMapping("/service_user/tb-user/login")
    public R loginUser (@RequestBody TbUser tbUser);

    @GetMapping("/service_user/tb-user/getUserInfo")
    public R getUserInfo(@RequestParam("username") String username);

    @GetMapping("/api/ucenter/wx/login")
    public String getWxCode();
}
